set permission

Hi i am making a script to create structured project according to a configure formal module. For each module i create i need to set the permissions, but sometimes this instruction fails when i set the permission for everyone.
I launch the script from a Database Manager user.
The code is very easy:
string ret = set(m_tmp, p_rmcda , s_managementGroup)
if (ret!="") {
print (s_Debug "!!!! WARNING unable to set permission for " s_managementGroup ": " ret "\n")
}

ret = set(m_tmp, p_r, "")
if (ret!="") {
print (s_Debug "!!!! WARNING unable to set permission for everyone: " ret "\n")
}

it return the user has no rights to modify the access
SystemAdmin - Wed Feb 27 03:55:45 EST 2013

Re: set permission
Tony_Goodman - Wed Feb 27 09:43:59 EST 2013

When setting the default access for everyone else, the third parameter to the set function must be null, not an empty string.
 

ret = set(m_tmp, p_r, null)

Tony Goodman, www.smartdxl.com

 

Re: set permission
SystemAdmin - Wed Feb 27 10:34:38 EST 2013

Tony_Goodman - Wed Feb 27 09:43:59 EST 2013

When setting the default access for everyone else, the third parameter to the set function must be null, not an empty string.
 

ret = set(m_tmp, p_r, null)

Tony Goodman, www.smartdxl.com

 

thanks, but why 'ret = set(m_tmp, read, "")' was working if i launched the script as administrator?

Re: set permission
Mathias Mamsch - Wed Feb 27 11:54:31 EST 2013

Tony_Goodman - Wed Feb 27 09:43:59 EST 2013

When setting the default access for everyone else, the third parameter to the set function must be null, not an empty string.
 

ret = set(m_tmp, p_r, null)

Tony Goodman, www.smartdxl.com

 

There is no difference between 'string null()' and the empty string in DOORS. The null() function returns a (constant) empty string. Regards, Mathias

Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

Re: set permission
SystemAdmin - Wed Feb 27 12:01:28 EST 2013

Mathias Mamsch - Wed Feb 27 11:54:31 EST 2013
There is no difference between 'string null()' and the empty string in DOORS. The null() function returns a (constant) empty string. Regards, Mathias


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

so why with Database manager user rights i can't set the permission on a module?
Where my instructions wrong?

Re: set permission
llandale - Wed Feb 27 15:22:11 EST 2013

You may need to "specific(m_tmp)" first, to make sure the module does not "inherit" access.

Re: set permission
SystemAdmin - Wed Feb 27 16:04:33 EST 2013

SystemAdmin - Wed Feb 27 12:01:28 EST 2013
so why with Database manager user rights i can't set the permission on a module?
Where my instructions wrong?

A user of the type "database manager" is just a user with the privileges "Create projects", "Archive data", … blah blah (check out the Edit User tab and the help file about the meaning of these check boxes).

Being able to "manage the database" does not mean that you will have Admin access to all modules or objects, it will only give you access to the database property sheet. Only the Divine "Administrator" Himself has access to everything.

So, you might want to create a group "Admin", include yourself in this group and ensure that every project, folder, module, object etc. will give "A" rights to this group.

Re: set permission
SystemAdmin - Thu Feb 28 03:42:22 EST 2013

SystemAdmin - Wed Feb 27 16:04:33 EST 2013
A user of the type "database manager" is just a user with the privileges "Create projects", "Archive data", … blah blah (check out the Edit User tab and the help file about the meaning of these check boxes).

Being able to "manage the database" does not mean that you will have Admin access to all modules or objects, it will only give you access to the database property sheet. Only the Divine "Administrator" Himself has access to everything.

So, you might want to create a group "Admin", include yourself in this group and ensure that every project, folder, module, object etc. will give "A" rights to this group.

this is right, sorry i miss to say that the user is launching the script has RMCDA rights on each modules

Re: set permission
llandale - Thu Feb 28 10:25:26 EST 2013

Mmmmmm. Just in case run this:

const string    cl_sPermisNone = "None"               // none access looks like this
Buffer  gl_psnConversion_Results = create(8)    // Local buffer to the following functions.
//***********************
string  fStringOfPsn(Permission psn)
{             // Convert the Permission to displayable string format,
                // e.g. 'RMCDA' or 'RM'
 
        if (null psn) return(cl_sPermisNone)
                                        gl_psnConversion_Results  = ""
        if (!null (psn & read))     gl_psnConversion_Results += "R"
        if (!null (psn & modify))   gl_psnConversion_Results += "M"
        if (!null (psn & create))   gl_psnConversion_Results += "C"
        if (!null (psn & delete))   gl_psnConversion_Results += "D"
        if (!null (psn & control))  gl_psnConversion_Results += "A"
 
        return(stringOf(gl_psnConversion_Results))
}     // end fStringOfPsn(Permis)
 
print fStringOfPsn(p_rmcda)


I'm wondering perhaps the current user has RMCDA because of that management group, p_rmcda is not what you think, and the first command REMOVES the user's "A" rights.

-Louie

Re: set permission
SystemAdmin - Thu Feb 28 11:02:23 EST 2013

llandale - Wed Feb 27 15:22:11 EST 2013
You may need to "specific(m_tmp)" first, to make sure the module does not "inherit" access.

this it work
thanks a lot